package com.hdl.servlet.admin;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hdl.entity.MallProduct;
import com.hdl.service.MallProductService;
import com.hdl.service.impl.MallProductServiceImpl;

@WebServlet("/admin/mallproduct-update1.let")
public class MallProductUpdate1Servlet extends HttpServlet{
	
	private MallProductService mp = new MallProductServiceImpl();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
         
    	String id = request.getParameter("updateid");
    	
    	MallProduct m = mp.SelectProductById(id);
    	
    	request.setAttribute("mpllproduct", m);
    	
    	request.getRequestDispatcher("/admin/mall/mall-update.jsp").forward(request, response);
    	
    	
    
    }
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    	doGet(req, resp);
    }
}
